// reading a text file
#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main (int argc, char *argv[]) {
  string line;
  int tab[32];
  ifstream myfile (argv[1]);
  ofstream myfilebin (argv[2], ios::out | ios::trunc | ios::binary);
  int var1, var2;
  if (myfile.is_open())
  {
    for(int i = 0; i<17; i++){
      myfile >> var1 >>var2;
      cout << var1 << var2;
      tab[i] = var1;
      tab[i+1] = var2;
    }
    for(int i = 0; i<17; i++){
      myfilebin << tab[i];
    }
    myfile.close();
  }

  else cout << "Unable to open file"; 

  return 0;
}